import axios from 'axios'

const
  dev = '/api/',
  pro = '/',
  rootURL = process.env.NODE_ENV === 'development' ? dev : pro,
  baseURL = rootURL + 'csn/a/mobile',
  req = axios.create({
    baseURL,
    timeout: 30000
  })

req.interceptors.response.use(res => {
  return res.data
})

export default req